" then delete char 1 of line x of bg fld textend repeatend repeatpop cardunlock screenanswer "Line feeds removed."end remLFson printDocrepeat with x = 1 to the number of cardsgo to card xif bg fld text is not empty then print bg field textend repeatend printDocon closeStackdelete menu "viewer"end closeStackon openCardput (the number of this card - 1) into bg fld "page#"put the number of cards - 1 into bg fld "of#"pass openCardend openCardon wordDocpush cardanswer "Get the number of ...?" with "Words" or "Characters" or "Cancel"if it = "Cancel" then exit wordDocif it = "Words"thenlock screenput 0 into temprepeat with x = 2 to the number of cardsgo to card xput the number of words of bg fld "text" + temp into tempend repeatpop cardunlock screenanswer "There are " & temp & " words in this document."elselock screenput 0 into temprepeat with x = 2 to the number of cardsgo to card xput the number of chars of bg fld "text" + temp into tempend repeatpop cardunlock screenanswer "There are " & temp & " characters in this document."end ifend wordDoc</script>